Distributor API
Access and Authorization
Access
Request Access to the Distributor API
This section lists the steps required to request access to the SRAM Distributor API. This API provides product catalog and price list information from SRAM products.
Navigate to the SRAM API Portal
The SRAM Distributor API is available in the SRAM API Portal located at https://api-portal.sram.com
Login to the Anypoint platform
Before you can request access to the SRAM Bike Dealer API, you will need a Mulesoft Anypoint account so we can grant access to the API. In the upper-right of the SRAM API Portal, there is a âloginâ link. Use this link to create your Mulesoft Anypoint account.
- Create an account using the email address of your account owner for SRAM Connect (https://www.sramconnect.com) if you donât already have one
- Allow SRAM access to your profile on login
Select the Distributor API
From the SRAM API Portal main page, select the âDistributor APIâ. This will take you to the Distributor API page which includes documentation for the API including the endpoints, data types, as well as a mocking service for the API. (You are here now if you see this).
From the Distributor API page, request access to the API
In the upper-right of the Distributor API page, you can request access to the API
Select the API Instance
From the âAPI Instanceâ drop-down, select the âProduction â Automatedâ instance of the API
Create a client application for the Distributor API
In the âApplicationâ drop-down, select âCreate a new applicationâ
Enter application details
This will be the application that SRAM will grant access to. You only need to provide a name and description.
- Please include the name of your Organization in the Application name.
Select appropriate SLA tier
Select the SLA tier that is most appropriate for your API usage and click the âRequest Accessâ]
You will then see the confirmation of your request
Verification
Once requested, we will reach out to the email associated with the client application to verify that you are as requested. Once verified your application will be approved.
Confirmation Email
You will receive a confirmation email once the API access is approved. Follow the link in the email to view your API credentials
API credentials
From the link in the confirmation email, you can view your application details including the Client ID and Client Secret.
The Client ID and Client Secret are used to authenticate calls to the SRAM Bike Dealer API. These values are passed in custom HTTP headers named client_id and client_secret when you make any API call.
Testing the API
This section walks through one approach to test the SRAM Bike Dealer API using Postman(https://www.postman.com/)
- Postman is not required to test the SRAM Distributor API - you can test the API using any REST client.
Download and extract the RAML specification
From the SRAM API Portal, download the Distributor API as RAML
Create a collection from the RAML specification
Extract the files from the downloaded RAML ZIP file, and locate the exp-distributor-api.raml file
- The ZIP file is located in your browserâs âdownloadsâ folder
In Postman, from the Collections view, select Import
From the Import dialog, drag and drop (or browse for) for the exp-distributor-api.raml file. The âImportâ dialog will show that it will create a collection from the RAML specification.
- The import will say Distributor API not 'Bike Dealer API'
Select the Import button to create the collection.
You now have a collection with requests for the endpoints in the SRAM Distributor API